<?php
/**
* 	Bushido
 *
 * @category   Bushido
 * @package    Bushido_FusionCharts
 * @subpackage Theme
 * @copyright  Copyright (c) 2008-2009 Nathan Keyes
 * @author Nathan Keyes
 * @version    $Id: Abstract.php 7 2009-11-14 22:42:08Z nkeyes $
 */


/**
 * 
 * @author Nathan Keyes
 *
 */
abstract class Bushido_FusionCharts_Theme_Abstract
{
	protected $name;
	protected $chartType;
	
	protected $isMultiSeries = true;
	
	public abstract function __construct();
	public abstract function getDataSetNode($name);
	public abstract function getDataNode($label, $value);
	public abstract function getCategoryNode($label);
	public abstract function getCategoryLabel($label);
	
	
	public function getXML()
	{
		$themeFile = isset($this->name) && file_exists(APPLICATION_PATH . '/configs/FusionCharts/themes/' . $this->name . '.xml') ? APPLICATION_PATH . '/configs/FusionCharts/themes/'.$this->name.'.xml' : APPLICATION_PATH . '/configs/FusionCharts/themes/default.xml';
		return simplexml_load_file($themeFile);
	}
	
	public function getChartType()
	{
		return $this->chartType;
	}
	
	public function setChartType($chartType)
	{
		$this->chartType = $chartType;
	}
	
	public function getName()
	{
		return $this->name;
	}
	
	public function setName($name)
	{
		$this->name = $name;
	}
	
	public function isMultiSeries()
	{
		return $this->isMultiSeries;
	}
	
	public function setMultiSeries($isMultiSeries)
	{
		$this->isMultiSeries = $isMultiSeries;
	}
}
